package com.ruowei.modules.foodOrder.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.Instant;

/**
 * 商家修改日志表
 */
@ApiModel(description = "商家修改日志表")
@Entity
@Table(name = "merchant_change_log")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Deprecated
public class MerchantChangeLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator")
    @SequenceGenerator(name = "sequenceGenerator")
    private Long id;

    /**
     * 商家编码
     */
    @ApiModelProperty(value = "商家编码")
    @Column(name = "merchant_code")
    private String merchantCode;

    /**
     * 商家名称
     */
    @ApiModelProperty(value = "商家名称")
    @Column(name = "merchant_name")
    private String merchantName;

    /**
     * 商家地址
     */
    @ApiModelProperty(value = "商家地址")
    @Column(name = "merchant_address")
    private String merchantAddress;

    /**
     * 商家电话
     */
    @ApiModelProperty(value = "商家电话")
    @Column(name = "phone")
    private String phone;

    /**
     * 商家描述
     */
    @ApiModelProperty(value = "商家描述")
    @Column(name = "description")
    private String description;

    /**
     * 商家公告
     */
    @ApiModelProperty(value = "商家公告")
    @Column(name = "notice")
    private String notice;

    /**
     * 商家营业时间
     */
    @ApiModelProperty(value = "商家营业时间")
    @Column(name = "open_time")
    private String openTime;

    /**
     * 商家状态
     */
    @ApiModelProperty(value = "商家状态")
    @Column(name = "status")
    private String status;

    /**
     * 商家起送价
     */
    @ApiModelProperty(value = "商家起送价")
    @Column(name = "starting_price")
    private BigDecimal startingPrice;

    /**
     * 商家登录名
     */
    @ApiModelProperty(value = "商家登录名")
    @Column(name = "login_code")
    private String loginCode;

    /**
     * 商家密码
     */
    @ApiModelProperty(value = "商家密码")
    @Column(name = "jhi_password")
    private String password;

    /**
     * 修改人
     */
    @ApiModelProperty(value = "修改人")
    @Column(name = "update_by")
    private String updateBy;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @Column(name = "update_time")
    private Instant updateTime;

    // jhipster-needle-entity-add-field - JHipster will add fields here
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMerchantCode() {
        return merchantCode;
    }

    public MerchantChangeLog merchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
        return this;
    }

    public void setMerchantCode(String merchantCode) {
        this.merchantCode = merchantCode;
    }

    public String getMerchantName() {
        return merchantName;
    }

    public MerchantChangeLog merchantName(String merchantName) {
        this.merchantName = merchantName;
        return this;
    }

    public void setMerchantName(String merchantName) {
        this.merchantName = merchantName;
    }

    public String getMerchantAddress() {
        return merchantAddress;
    }

    public MerchantChangeLog merchantAddress(String merchantAddress) {
        this.merchantAddress = merchantAddress;
        return this;
    }

    public void setMerchantAddress(String merchantAddress) {
        this.merchantAddress = merchantAddress;
    }

    public String getPhone() {
        return phone;
    }

    public MerchantChangeLog phone(String phone) {
        this.phone = phone;
        return this;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDescription() {
        return description;
    }

    public MerchantChangeLog description(String description) {
        this.description = description;
        return this;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getNotice() {
        return notice;
    }

    public MerchantChangeLog notice(String notice) {
        this.notice = notice;
        return this;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public String getOpenTime() {
        return openTime;
    }

    public MerchantChangeLog openTime(String openTime) {
        this.openTime = openTime;
        return this;
    }

    public void setOpenTime(String openTime) {
        this.openTime = openTime;
    }

    public String getStatus() {
        return status;
    }

    public MerchantChangeLog status(String status) {
        this.status = status;
        return this;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public BigDecimal getStartingPrice() {
        return startingPrice;
    }

    public MerchantChangeLog startingPrice(BigDecimal startingPrice) {
        this.startingPrice = startingPrice;
        return this;
    }

    public void setStartingPrice(BigDecimal startingPrice) {
        this.startingPrice = startingPrice;
    }

    public String getLoginCode() {
        return loginCode;
    }

    public void setLoginCode(String loginCode) {
        this.loginCode = loginCode;
    }

    public String getPassword() {
        return password;
    }

    public MerchantChangeLog password(String password) {
        this.password = password;
        return this;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public MerchantChangeLog updateBy(String updateBy) {
        this.updateBy = updateBy;
        return this;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Instant getUpdateTime() {
        return updateTime;
    }

    public MerchantChangeLog updateTime(Instant updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public void setUpdateTime(Instant updateTime) {
        this.updateTime = updateTime;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MerchantChangeLog)) {
            return false;
        }
        return id != null && id.equals(((MerchantChangeLog) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "MerchantChangeLog{" +
            "id=" + getId() +
            ", merchantCode='" + getMerchantCode() + "'" +
            ", merchantName='" + getMerchantName() + "'" +
            ", merchantAddress='" + getMerchantAddress() + "'" +
            ", phone='" + getPhone() + "'" +
            ", description='" + getDescription() + "'" +
            ", notice='" + getNotice() + "'" +
            ", openTime='" + getOpenTime() + "'" +
            ", status='" + getStatus() + "'" +
            ", startingPrice='" + getStartingPrice() + "'" +
            ", password='" + getPassword() + "'" +
            ", updateBy='" + getUpdateBy() + "'" +
            ", updateTime='" + getUpdateTime() + "'" +
            "}";
    }
}
